<template>
  <div>
    <el-row class="tac">
        <el-col :span="22">
          <el-menu
            active-text-color="#ffd04b"
            background-color="#545c64"
            class="el-menu-vertical-demo"
            default-active="2"
            text-color="#fff"
            @open="handleOpen"
            @close="handleClose"
            router
          >
            <el-sub-menu index="1">
              <template #title>
                <el-icon><location /></el-icon>
                <span>人员管理</span>
              </template>
              <el-menu-item-group title="Group One">
                <el-menu-item index="1-1">学员管理1</el-menu-item>
                <el-menu-item :route="{path:'/student'}" index="学员管理2">学员管理2 </el-menu-item>
              </el-menu-item-group>
              <el-menu-item-group title="Group Two">
                <el-menu-item  index="admin">管理员</el-menu-item>
              </el-menu-item-group>
            </el-sub-menu>
         <el-sub-menu index="2">
              <template #title>
                <el-icon><location /></el-icon>
                <span>课程管理</span>
              </template>
              <el-menu-item-group title="Group One">
                <el-menu-item index="courselist">课程列表</el-menu-item>
              </el-menu-item-group>
               <el-menu-item  index="video">视频管理</el-menu-item>
               <el-menu-item  index="addcourse">课程添加</el-menu-item>
            </el-sub-menu>
            <el-menu-item index="3" disabled>
              <el-icon><document /></el-icon>
              <span>Navigator Three</span>
            </el-menu-item>
            <el-menu-item index="4">
              <el-icon><setting /></el-icon>
              <span>Navigator Four</span>
            </el-menu-item>
          </el-menu>
        </el-col>
      </el-row>
  </div>
</template>
<script lang="ts" setup>
import {
  Location,
  Document,
  Menu as IconMenu,
  Setting,
} from '@element-plus/icons-vue'
const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
</script>
<style lang="less">
  .el-menu-vertical-demo{
    box-sizing: border-box;
  }
</style>